home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!dfdesign.demon.co.uk
- From: Dominic Feeley <dom@dfdesign.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: operator % - compiler error
- Date: Tue, 19 Mar 96 19:32:41 GMT
- Organization: DF Designs
- Message-ID: <827263961snz@dfdesign.demon.co.uk>
- References: <4ihuuh$6ul@hatathli.csulb.edu>
- Reply-To: dom@dfdesign.demon.co.uk
- X-NNTP-Posting-Host: dfdesign.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.30
- X-Mail2News-Path: dfdesign.demon.co.uk
-
- In article <4ihuuh$6ul@hatathli.csulb.edu> davidcho@csulb.edu "David Cho" writes:
-
- > When I try to compile, I get an erro message for the following line: >
- >
- > x=663608941*y%pow(2,32) /*I want remainder*/
- >
- > But the error message says "illegal use of floating point". What does
- > that mean? Isn't % used a an operator to calcuate the remainder?
-
- Yes, but the operands of % must be of integral type in ANSI C
- pow() returns a double.
-
- Regards,
- Dominic.
-
- --
- Dominic Feeley
-